package com.lzh.des_lib;

import android.support.annotation.NonNull;

/**
 * Created by lizhi on 2017/6/2.
 */

public class DesUtil {
    static {
        System.loadLibrary("des-lib");
    }

    public static byte[] decryption(@NonNull byte[] value) {
        return _decryption(value.clone());
    }

    public static byte[] encryption(@NonNull byte[] value) {
        return _encryption(value.clone());
    }

    public static byte[] decryXor(@NonNull byte[] value) {
        return _decryXor(value.clone());
    }

    public static native byte xorSum(@NonNull byte[] value);

    private static native byte[] _decryption(byte[] value);

    private static native byte[] _encryption(byte[] value);

    private static native byte[] _decryXor(byte[] value);
}
